function [Outputs,Fnk]=RFNNpro_v(S,W)
    % 参数初始化
    numInputs=size(S,2);% 输入层节点数
    numMFsPerInput=2;% 每个输入的隶属度函数数
    numRules=16;% 模糊规则数
    numOutputs=2;% 输出层节点数
    % 初始化静态变量
    persistent pre_firingStrengths;
    if isempty(pre_firingStrengths)
            pre_firingStrengths =zeros(1,numRules);
    end
    %训练均值和标准差
    c=[0,0,-pi/2,-pi/2;
        10,2,pi/2,pi/2];
    sigma=[2.5,0.6,1,1];%VL,VR
    % 隶属度层
    MFs = zeros(numMFsPerInput, numInputs);
    for i = 1:numInputs
        for j = 1:numMFsPerInput
            % 定义高斯隶属度函数的参数
            c_ij= c(j,i);%均值
            sigma_ij= sigma(i);%v标准差
            MFs(j, i) = exp(-((S(i)-c_ij)^2)/(sigma_ij^2));
        end
    end
    % 模糊规则层
    firingStrengths=ones(1, numRules);
    for r = 1:numRules
        % 计算每条规则的激活程度（AND操作）
        switch r
            case 1
                firingStrengths(r)=min([MFs(1,1),MFs(1,2),MFs(1,3),MFs(1,4)]);%near near right right
            case 2
                firingStrengths(r)=min([MFs(1,1),MFs(1,2),MFs(1,3),MFs(2,4)]);%near near right left
            case 3
                firingStrengths(r)=min([MFs(1,1),MFs(1,2),MFs(2,3),MFs(1,4)]);%near near left right
            case 4
                firingStrengths(r)=min([MFs(1,1),MFs(1,2),MFs(2,3),MFs(2,4)]);%near near left left
            case 5
                firingStrengths(r)=min([MFs(1,1),MFs(2,2),MFs(1,3),MFs(1,4)]);%near far right right
            case 6
                firingStrengths(r)=min([MFs(1,1),MFs(2,2),MFs(1,3),MFs(2,4)]);%near far right left
            case 7
                firingStrengths(r)=min([MFs(1,1),MFs(2,2),MFs(2,3),MFs(1,4)]);%near far left right
            case 8
                firingStrengths(r)=min([MFs(1,1),MFs(2,2),MFs(2,3),MFs(2,4)]);%near far left left
            case 9
                firingStrengths(r)=min([MFs(2,1),MFs(1,2),MFs(1,3),MFs(1,4)]);%far near right right
            case 10
                firingStrengths(r)=min([MFs(2,1),MFs(1,2),MFs(1,3),MFs(2,4)]);%far near right left
            case 11
                firingStrengths(r)=min([MFs(2,1),MFs(1,2),MFs(2,3),MFs(1,4)]);%far near left right
            case 12
                firingStrengths(r)=min([MFs(2,1),MFs(1,2),MFs(2,3),MFs(2,4)]);%far near left left
            case 13
                firingStrengths(r)=min([MFs(2,1),MFs(2,2),MFs(1,3),MFs(1,4)]);%far far right right
            case 14
                firingStrengths(r)=min([MFs(2,1),MFs(2,2),MFs(1,3),MFs(2,4)]);%far far right left
            case 15
                firingStrengths(r)=min([MFs(2,1),MFs(2,2),MFs(2,3),MFs(1,4)]);%far far left right
            case 16
                firingStrengths(r)=min([MFs(2,1),MFs(2,2),MFs(2,3),MFs(2,4)]);%far far left left
        end
    end
    time_delay=zeros(1,numRules);
    now_firingStrengths=(ones(1,numRules)-time_delay).*firingStrengths+time_delay.*pre_firingStrengths;
    Fnk=now_firingStrengths;
    pre_firingStrengths=now_firingStrengths;
    %后件层
    [rulesOn,i]=max(now_firingStrengths);
    Outputs=rulesOn*W(:,i);
%     Outputs = zeros(numOutputs, 1);
%     for o = 1:numOutputs
%         for r = 1:numRules
%             % 线性组合
%             Outputs(o) = Outputs(o) + now_firingStrengths(r) * W(o, r);
%         end
%     end
end